The present invention relates to tuning feedforward parameters in a motion control system, and, more particularly, in one embodiment, to a method and apparatus which automatically tunes feedforward gains, such as acceleration feedforward gain, constant offset feedforward gain, Coulomb friction feedforward gain, and viscous friction feedforward gain, by providing a velocity command to a motor control system, measuring the corresponding torque command signals and velocity feedback signals, and using these values in an equation relating the sum of the torques acting on the system.
Traditional machine tool position control systems are designed with feedback control in which xe2x80x9cfollowing errorxe2x80x9d (the difference between the actual and desired positions) produces a command which is delivered to a velocity control loop for driving an actuator connected to a movable member. The actuator and/or connected movable member are sometimes referred to as an xe2x80x9caxisxe2x80x9d of the machine tool or device having the movable member. In practice, it is difficult, if not impossible, to achieve zero following error during motion of the axis if only feedback control is utilized. Following errors generally do not cause a problem in the case of machining long linear spans, because the following error vector is along the desired straight line path, and, accordingly, the machine path follows the desired path. However, in the case of cut direction changes or in complex contouring, following errors can cause the machined path to deviate from the desired path resulting in a xe2x80x9ccontour error.xe2x80x9d Typically, the magnitude of the contour error increases as the feedrate and/or path curvature increases. In addition to following errors, disturbance forces, such as Coulomb friction, may also cause the machine to deviate from the desired path.
Accordingly, xe2x80x9cfeedforwardxe2x80x9d control was developed to attempt to minimize following errors and errors caused by disturbance forces. Feedforward control attempts to minimize the following errors and to compensate xe2x80x9cin advancexe2x80x9d for the errors caused by known disturbance forces by anticipating the response of the machine tool system. The required information to allow feedforward to anticipate in advance is obtained by performing measurements of machine state variables while the machine undergoes various controlled movements, and/or a theoretical analysis from knowledge of system components, and geometries (e.g., system inertia). Feedforward compensation involves applying additional control signals, such as additional torque or velocity commands for example, based upon this knowledge of the system dynamics, rather than waiting for feedback errors to build up, as occurs in feedback control. Feedforward is used in addition to feedback, because feedback is still required to account for imperfections in the feedforward system model, and to counter unexpected forces, such as cutting forces.
It has been known that, for optimum performance, a number of feedforward compensations should be utilized. For example, a velocity feedforward compensation can be utilized to compensate for velocity feedback control dynamics, and an acceleration feedforward compensation can be utilized to compensate for inertial forces. In addition, a viscous friction feedforward compensation can be applied to compensate for viscous friction forces, a Coulomb friction feedforward compensation can be applied to compensate for Coulomb friction forces, and a constant offset feedforward compensation can be applied to compensate for gravitational forces.
In discrete time systems (i.e. sampled data systems), the feedforward command values can be generated at each update interval. The feedforward command values can then be added to the velocity command and/or torque commands, and the servo can hold these signals constant over the update interval.
Previously, many feedforward compensation levels had to be determined manually. For example, to determine a Coulomb friction feedforward gain, the axis could be moved in a positive direction at a constant velocity and then moved in the negative direction at a constant velocity. Motor current measurements could be taken during these movements, and the measurements used to manually calculate a Coulomb friction feedforward gain. To determine an acceleration feedforward gain, the inertia level of each pertinent mechanical element in the system could be calculated individually, and the sum of these values used to determine an appropriate acceleration feedforward gain.
As can be understood, such manual calculations had a number of disadvantages. For example, manual tuning took a considerable amount of time, and often provided less than accurate estimates. Moreover, the manual tuning of feedforward gains required an engineer or technician with sufficient knowledge of the control system and the required calculations. In addition, there was not a reliable way of determining whether the model developed from the manual calculations accurately described the actual system dynamics. Furthermore, when test movements and measurements were used, such as when deriving a Coulomb friction gain, there was no way of determining whether the test sufficiently xe2x80x9cexcitedxe2x80x9d the axis by moving it through enough modes of operation (e.g., enough different velocities, accelerations, and position changes.) In addition, such manual testing procedures did not provide a way of automatically determining an optimum excitation program (i.e., test motion) for the axis based upon user-enterable operating parameters.
U.S. Pat. No. 5,684,375, which issued to Chaffee, discloses a method for tuning gains in electronic motion control systems. According to the patent, the motor is commanded through a single, unidirectional motion event for tuning these parameters. As disclosed in the patent, the event comprises driving the motor at a predetermined tuning torque level until the motor reaches a predetermined maximum velocity, and then decelerating the motor back to zero at the tuning torque level. FIG. 5 and FIG. 6 of Chaffee illustrate the control signals generated and the velocity profile of the motor during this tuning motion. During the motion, feedback signals from the motor are monitored and parameters, such as the electrical current applied to the motor, the velocity of the motor, and the acceleration and deceleration times are recorded. The patent discloses that a number of values can be calculated based upon the parameters measured and recorded, such as the effective inertia value Jm, the position feedback error proportional gain Kp(pos), the velocity feedback error proportional gain Kp(vel), the position feedback error integral gain Ki(pos), and the velocity feedback error integral gain Ki(vel). The feedforward gain Kff, on the other hand, is apparently not tuned, as the patent discloses that it can be set either to unity or to zero, depending on whether feedforward is to be applied.
U.S. Pat. No. 5,159,254, which issued to Teshima, discloses a method of estimating mass, inertia, viscous friction coefficient, or sliding frictional force of a movable part in a machine, by using a spring mass system as a model for the dynamic characteristic of the movable part. According to the reference, the following equation is used to represent the relationship between x1, (which indicates a value obtained by converting an angular value of a motor shaft into a traveling direction of the movable part), and x2 (which indicates a position of the movable part):
K(x2xe2x88x92x1)=m {umlaut over (x)}2+c {dot over (x)}2+fr (if {dot over (x)}2 greater than 0) 
K(x2xe2x88x92x1)=m {umlaut over (x)}2+c {dot over (x)}2xe2x88x92fr (if {dot over (x)}2 less than 0) 
where x2 is the velocity of the movable part, x2 is the acceleration of the movable part, m is the mass, c is the viscous friction coefficient, and fr is the sliding frictional force of the movable part, respectively. These equations are then converted to an equation relating the motor current feedback value to the velocity and acceleration of the movable part, to obtain the mass m, viscous friction coefficient c, and Coulomb frictional force fr. The patent discloses that inertia is calculated by equation (4) of the reference which relates maximum current feedback value Imax at the time of acceleration to the inertia (JI+JM). The reference mentions that the mass, viscous friction coefficient, and sliding frictional force can then be used to automatically adjust the acceleration/deceleration time constants, the position feedback loop gain of the servo controller, for the purposes of avoiding motor current saturation. However, the derivation of feedforward parameters does not appear to be disclosed, nor does the reference disclose the computation of any confidence factors for indicating the accuracy of the derived parameters. Also, the reference does not appear to disclose the need for predetermined motion for computing the values, or any method of computing such a motion.
Thus, there remains a need for a method and apparatus which automatically and accurately tunes feedforward control parameters, which can be used in addition to feedback control for more precision machining. In addition, there remains a need for such an automatic tuning method and apparatus which can utilize a single equation relating the sum of the torques acting on the system for deriving several feedforward gains. Furthermore, there remains a need for such a method and apparatus which can also determine how closely the derived feedforward gains accurately describe the actual system dynamics.
Moreover, there remains a need for a test motion program which will sufficiently model the various conditions under which the axis will operate, so as to provide greater accuracy to the feedforward parameters which are tuned. Furthermore, there is a need for a method and apparatus which will automatically derive an optimum test motion program for tuning feedforward gains, based upon user-enterable data. There is also a need to automatically determine the sufficiency of the test motion which is derived.
It is an object of the present invention to obviate the above-described problems.
Another object of the present invention is to provide a method and apparatus for automatically tuning feedforward parameters in a motion control system, such as a machine tool control system for example.
Yet another object of the present invention is to automatically, effectively and accurately tune a number of feedforward parameters simultaneously.
It is another object of the invention to provide a method and apparatus for automatically calculating feedforward parameters, such as feedforward gain values, which has the capability of verifying the accuracy of the parameters which are calculated.
Another object of the invention is to provide an optimum test excitation program for use in tuning feedforward parameters.
Yet another object of the present invention is to automatically determine an optimum excitation program for tuning feedforward parameters based upon user-enterable data regarding the axis to be tuned.
An additional object of the invention is to automatically determine the sufficiency of the test excitation program used for tuning feedforward parameters.
Another object of the invention is to provide a method and apparatus to estimate the velocity controller""s gains for the purpose of implementing feedforward on systems with an analog servo interface.
To achieve the foregoing and other objects, and in accordance with the one aspect of the invention, a method is provided for tuning feedforward parameters in a motion control system having an actuator that controls motion of a mechanical member. The method comprises applying command signals to an actuator to cause movement of the actuator and attached mechanical member, recording operation data associated with the actuator during the movement, and calculating feedforward parameters for control of the actuator and mechanical member based upon the operation data.
According to one embodiment, the operation data comprises a plurality of actuator velocity measurements and a plurality of actuator torque commands corresponding to the velocity measurements. In accordance with one embodiment, the calculating step comprises calculating values for inertia, Coulomb friction, viscous friction, and constant offset. The feedforward parameters are then derived based upon the calculated values, and comprise an acceleration feedforward gain, Coulomb friction feedforward gain, viscous friction feedforward gain, and constant offset feedforward gain. According to an embodiment, the feedforward parameters are calculated based upon an equation relating the sum of the torques acting on the actuator with angular acceleration of the actuator, and the operation data is inserted into the equation. In accordance with one embodiment, the accuracy of the calculated feedforward parameters is determined.
In another aspect of the invention, a machine tool is provided having an actuator and attached mechanical member, a velocity sensor in communication with the actuator, a position command generator, a feedforward command generator, a controller in communication with the actuator, sensor, and position and feedforward command generators, a feedforward tuning unit in communication with the sensor, and an output device. The velocity sensor is adapted to sense the velocity of the actuator, and the position command generator is adapted to produce position commands to control the actuator. The feedforward command generator is adapted to produce feedforward commands based upon a feedforward gain, and the controller is adapted to control the motion of the actuator based upon the position commands, feedforward commands, and actuator velocity. The feedforward tuning unit is adapted to calculate a value for the feedforward gain based upon velocity measurements from the velocity sensor, and the output device is adapted to communicate the calculated value for feedforward gain.
Still other aspects and objects of the present invention will become apparent to those skilled in this art from the following description wherein there is shown and described preferred embodiments of this invention, simply by way of illustration, as well as a best mode contemplated for carrying out the invention. As will be realized, the invention is capable of other different aspects and embodiments without departing from the scope of the invention. Accordingly, the drawings and descriptions should be regarded as illustrative and not as restrictive in nature.